<template>
	<view class="header" @click="toSearch">
		<view class="inner">
			<icon type="search" size="16" />
			<text>搜索</text>
		</view>
	</view>
</template>

<script>
	export default{
		methods:{
			// 跳转到搜索页面
			toSearch(){
				uni.navigateTo({
					url:'/pages/search/search'
				})
			}
		}
	}
</script>

<style scoped lang="less">
	.header {
		height: 100rpx;
		padding: 20rpx 16rpx;
		box-sizing: border-box;
		background-color: #eb4450;
	
		.inner {
			height: 60rpx;
			line-height: 60rpx;
			background-color: #fff;
			border-radius: 8rpx;
			position: relative;
			text-align: center;
	
			text {
				color: #bbb;
			}
	
			icon {
				position: absolute;
				top: 16rpx;
				left: 280rpx;
			}
		}
	}
</style>
